import java.net.ServerSocket;
import java.net.Socket;

/**
 * @author 乐心湖
 * @version 1.0
 * @date 2021/8/30 9:20
 */

public class ChatServer {
    public static void main(String[] args) throws Exception {
        ServerSocket serverSocket = new ServerSocket(9900);
        while (true) {
            //接受到的客户端，传给聊天通道
            Socket socket = serverSocket.accept();
            new Thread(new ChatChannel(socket),"聊天线程").start();
        }
    }
}
